'\" te
.\"  Copyright (c) 2001 by Sun Microsystems, Inc.  All rights reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH RSM_MEMSEG_IMPORT_INIT_BARRIER 3RSM "Jun 8, 2001"
.SH NAME
rsm_memseg_import_init_barrier, rsm_memseg_import_destroy_barrier \- create or
destroy barrier for imported segment
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR... ] \fIfile\fR... -lrsm [ \fIlibrary\fR... ]
#include <rsmapi.h>

\fBint\fR \fBrsm_memseg_import_init_barrier\fR(
     \fBrsm_memseg_import_handle_t\fR \fImemseg\fR, \fBrsm_barrier_type_t\fR \fItype\fR,
     \fBrsmapi_barrier_t *\fR\fIbarrier\fR);
.fi

.LP
.nf
\fBint\fR \fBrsm_memseg_import_destroy_barrier\fR(\fBrsmapi_barrier_t *\fR\fIbarrier\fR);
.fi

.SH DESCRIPTION
.sp
.LP
The \fBrsm_memseg_import_init_barrier()\fR function creates a barrier for the
imported segment specified by \fImemseg\fR. The barrier type is specified by
the \fItype\fR argument. Currently, only \fBRSM_BAR_DEFAULT\fR is supported as
a barrier type. A handle to the barrier is obtained through the \fIbarrier\fR
argument and is used in subsequent barrier calls.
.sp
.LP
The \fBrsm_memseg_import_destroy_barrier()\fR function deallocates all the
resources associated with the barrier.
.SH RETURN VALUES
.sp
.LP
Upon successful completion, these functions return 0. Otherwise, an error value
is returned to indicate the error.
.SH ERRORS
.sp
.LP
The \fBrsm_memseg_import_init_barrier()\fR and
\fBrsm_memseg_import_destroy_barrier()\fR functions can return the following
errors:
.sp
.ne 2
.na
\fB\fBRSMERR_BAD_SEG_HNDL\fR \fR
.ad
.RS 27n
Invalid segment handle.
.RE

.sp
.ne 2
.na
\fB\fBRSMERR_BAD_BARRIER_PTR\fR \fR
.ad
.RS 27n
Invalid barrier pointer.
.RE

.sp
.LP
The \fBrsm_memseg_import_init_barrier()\fR function can return the following
errors:
.sp
.ne 2
.na
\fB\fBRSMERR_INSUFFICIENT_MEM\fR \fR
.ad
.RS 28n
Insufficient memory.
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Evolving
_
MT-Level	MT-Safe
.TE

.SH SEE ALSO
.sp
.LP
.BR rsm_memseg_import_open_barrier (3RSM),
.BR rsm_memseg_import_set_mode (3RSM),
.BR attributes (7)
